package knowledge.attr.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import com.googlecode.jtiger.core.model.BaseIdModel;

@SuppressWarnings("serial")
@Entity
@Table(name = "KN_ATTACHMENT")
public class KNAttachment extends BaseIdModel {
	/**
	 * 访问路径
	 */
	private String url;

	/**
	 * 附件描述
	 */
	private String descn;

	/**
	 * 文件名
	 */
	private String filename;
	/**
	 * 上传时间
	 */
	private Date createTime;
	/**
	 * 上传人
	 */
	private String creator;

	/**
	 * 扩展名
	 */
	private String fileExt;
	/**
	 * 附件类型，用以区分归属哪个实体类型的附件
	 */
	private String attachType;
	/**
	 * 附件主人的id,也就是实体的id,即通过附件类型(归属哪个实体)和实体id唯一确定一个附件
	 */
	private String ownerId;

	@Column(name = "URL", length = 256)
	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	@Column(name = "DESCN", length = 2000)
	public String getDescn() {
		return descn;
	}

	public void setDescn(String descn) {
		this.descn = descn;
	}

	@Column(name = "FILE_NAME", length = 256)
	public String getFilename() {
		return filename;
	}

	public void setFilename(String filename) {
		this.filename = filename;
	}

	@Column(name = "FILE_EXT", length = 20)
	public String getFileExt() {
		return fileExt;
	}

	public void setFileExt(String fileExt) {
		this.fileExt = fileExt;
	}

	@Column(name = "ATTACH_TYPE", length = 256)
	public String getAttachType() {
		return attachType;
	}

	public void setAttachType(String attachType) {
		this.attachType = attachType;
	}

	public String getOwnerId() {
		return ownerId;
	}

	public void setOwnerId(String ownerId) {
		this.ownerId = ownerId;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

}
